<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>(retarget-io)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">(retarget-io)</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__group__board__libs.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">Retarget IO</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaaa709563e2b41d46584a9307df4f1386"><td class="memItemLeft" align="right" valign="top"><a id="gaaa709563e2b41d46584a9307df4f1386" name="gaaa709563e2b41d46584a9307df4f1386"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_RETARGET_IO_RSLT_NULL_UART_PTR</b>&#160;&#160;&#160;    (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_RETARGET_IO, 0))</td></tr>
<tr class="memdesc:gaaa709563e2b41d46584a9307df4f1386"><td class="mdescLeft">&#160;</td><td class="mdescRight">A null pointer was passed as a function parameter. <br /></td></tr>
<tr class="separator:gaaa709563e2b41d46584a9307df4f1386"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabb0b30d1e6a6c7e301b2b74450be762d"><td class="memItemLeft" align="right" valign="top"><a id="gabb0b30d1e6a6c7e301b2b74450be762d" name="gabb0b30d1e6a6c7e301b2b74450be762d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_RETARGET_IO_BAUDRATE</b>&#160;&#160;&#160;(115200)</td></tr>
<tr class="memdesc:gabb0b30d1e6a6c7e301b2b74450be762d"><td class="mdescLeft">&#160;</td><td class="mdescRight">UART baud rate. <br /></td></tr>
<tr class="separator:gabb0b30d1e6a6c7e301b2b74450be762d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8412e89ceaeefb3ab3d75509ab99680b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga8412e89ceaeefb3ab3d75509ab99680b">CY_RETARGET_IO_CONVERT_LF_TO_CRLF</a></td></tr>
<tr class="memdesc:ga8412e89ceaeefb3ab3d75509ab99680b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defining this macro enables conversion of line feed (LF) into carriage return followed by line feed (CR &amp; LF) on the output direction (STDOUT).  <a href="group__group__board__libs.html#ga8412e89ceaeefb3ab3d75509ab99680b">More...</a><br /></td></tr>
<tr class="separator:ga8412e89ceaeefb3ab3d75509ab99680b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga4905a76eaea9b40111887f5b6ff7d252"><td class="memItemLeft" align="right" valign="top">cy_rslt_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga4905a76eaea9b40111887f5b6ff7d252">cy_retarget_io_init</a> (CySCB_Type *uart)</td></tr>
<tr class="memdesc:ga4905a76eaea9b40111887f5b6ff7d252"><td class="mdescLeft">&#160;</td><td class="mdescRight">UART HAL object used by this library.  <a href="group__group__board__libs.html#ga4905a76eaea9b40111887f5b6ff7d252">More...</a><br /></td></tr>
<tr class="separator:ga4905a76eaea9b40111887f5b6ff7d252"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8794fce4e5de7f40e667dcbf123ea462"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga8794fce4e5de7f40e667dcbf123ea462">cy_retarget_io_is_tx_active</a> (void)</td></tr>
<tr class="memdesc:ga8794fce4e5de7f40e667dcbf123ea462"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether there is data waiting to be written to the serial console.  <a href="group__group__board__libs.html#ga8794fce4e5de7f40e667dcbf123ea462">More...</a><br /></td></tr>
<tr class="separator:ga8794fce4e5de7f40e667dcbf123ea462"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa3ec2f7eab2ff27d716f2b22d90ff514"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#gaa3ec2f7eab2ff27d716f2b22d90ff514">cy_retarget_io_deinit</a> (void)</td></tr>
<tr class="memdesc:gaa3ec2f7eab2ff27d716f2b22d90ff514"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases the UART interface allowing it to be used for other purposes.  <a href="group__group__board__libs.html#gaa3ec2f7eab2ff27d716f2b22d90ff514">More...</a><br /></td></tr>
<tr class="separator:gaa3ec2f7eab2ff27d716f2b22d90ff514"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga8412e89ceaeefb3ab3d75509ab99680b" name="ga8412e89ceaeefb3ab3d75509ab99680b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8412e89ceaeefb3ab3d75509ab99680b">&#9670;&nbsp;</a></span>CY_RETARGET_IO_CONVERT_LF_TO_CRLF</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_RETARGET_IO_CONVERT_LF_TO_CRLF</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Defining this macro enables conversion of line feed (LF) into carriage return followed by line feed (CR &amp; LF) on the output direction (STDOUT). </p>
<p >You can define this macro through the DEFINES variable in the application Makefile. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga4905a76eaea9b40111887f5b6ff7d252" name="ga4905a76eaea9b40111887f5b6ff7d252"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4905a76eaea9b40111887f5b6ff7d252">&#9670;&nbsp;</a></span>cy_retarget_io_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cy_rslt_t cy_retarget_io_init </td>
          <td>(</td>
          <td class="paramtype">CySCB_Type *&#160;</td>
          <td class="paramname"><em>uart</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>UART HAL object used by this library. </p>
<p >defined(COMPONENT_MTB_HAL)</p>
<p >Initialization function for redirecting low level IO commands to allow sending messages over a UART interface with a configurator generated configuration struct. This will setup the communication interface to allow using printf and related functions.</p>
<p >This function assumes that you've already 1) initialized, and 2) enabled the UART instance using PDL function calls.</p>
<p >When not using the HAL, retarget-io is not thread safe. Consider using printf from a single thread or using a mutex to protect the printf calls.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uart</td><td>Pointer to UART object, usually named and defined in device-configurator.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CY_RSLT_SUCCESS if successfully initialized, else an error if the UART parameter is a null pointer. </dd></dl>

</div>
</div>
<a id="ga8794fce4e5de7f40e667dcbf123ea462" name="ga8794fce4e5de7f40e667dcbf123ea462"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8794fce4e5de7f40e667dcbf123ea462">&#9670;&nbsp;</a></span>cy_retarget_io_is_tx_active()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cy_retarget_io_is_tx_active </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks whether there is data waiting to be written to the serial console. </p>
<dl class="section return"><dt>Returns</dt><dd>true if there are pending TX transactions, otherwise false </dd></dl>

</div>
</div>
<a id="gaa3ec2f7eab2ff27d716f2b22d90ff514" name="gaa3ec2f7eab2ff27d716f2b22d90ff514"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa3ec2f7eab2ff27d716f2b22d90ff514">&#9670;&nbsp;</a></span>cy_retarget_io_deinit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cy_retarget_io_deinit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Releases the UART interface allowing it to be used for other purposes. </p>
<p >After calling this, printf and related functions will no longer work. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>(retarget-io)</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
